home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4588 < prev    next >
Encoding:
Text File  |  1996-08-06  |  705 b   |  32 lines

  1. Path: southwind.net!usenet
  2. From: kurtg@southwind.net (Kurt Graber)
  3. Newsgroups: comp.lang.c++
  4. Subject: for loop question
  5. Date: 31 Jan 1996 04:16:39 GMT
  6. Organization: SouthWind Internet Access, Inc.
  7. Message-ID: <4emqf8$470@opal.southwind.net>
  8. NNTP-Posting-Host: onyx.southwind.net
  9. X-Newsreader: WinVN 0.91.6
  10.  
  11. I am currently learning c++ so maybe you gurus can answer this
  12. also I am using borland turbo c++ 3.0
  13. I can't get the following code to give me any output.
  14.  
  15. #include <iostream.h>
  16.  
  17. void main (void)
  18. {
  19.    int a;
  20.    for(a = 0;a == 10;a++)
  21.    {
  22.     cout << "anything";
  23.    }
  24. }
  25.  
  26. ///If I change the loop to     for(a=0;a<=10;a++)
  27.    the program will work fine.   
  28.    why?????????
  29.     thanks 
  30.          kurt
  31.  
  32.